package Test;

import java.util.ArrayList;

//import static java.util.Collections.shuffle;

class Card { //定义（创建）扑克牌的一张牌
    private String suit;//花色
    private String rank;//点数

    public Card(String suit, String rank) {
        this.suit = suit;
        this.rank = rank;
    }

    public String getSuit() {
        return suit;
    }

    public String getRank() {
        return rank;
    }

    public void setRank(String rank) {
        this.rank = rank;
    }

    public void setSuit(String suit) {
        this.suit = suit;
    }

    @Override
    public String toString() {
        return "("+this.suit+this.rank+")";
    }
}
    public class test {

    //创建扑克牌
    public static ArrayList<Card> SetDeck(){
        ArrayList<Card> deck=new ArrayList<Card>();
        //创建扑克牌中的内容
        String []suits={"方块","♠","♥","♣"};
        for (String s:suits){
            for(int i=1;i<=10;i++){
                Card cards=new Card(s,String.valueOf(i));
                deck.add(cards);
            }
            Card cardJ=new Card(s,"J");
            Card cardK=new Card(s,"K");
            Card cardQ=new Card(s,"Q");
            deck.add(cardJ);
            deck.add(cardQ);
            deck.add(cardK);
        }
        return deck;
    }
    public static ArrayList<Card> Myshuffle{
            System.out.println();
    }
    public static void main(String[] args) {
        //使用ArrayList创建一副扑克牌
        ArrayList<Card> deck=SetDeck();
        //打印原始牌
        System.out.println("洗牌前："+deck);
        //洗牌
        //Myshuffle(deck);
        System.out.println("洗牌后："+deck);
        //打印洗完后的牌


    }
}
